* Step 1: DependencyPairs WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict TRS:
activate(X) -> X
activate(n__first(X1,X2)) -> first(X1,X2)
activate(n__from(X)) -> from(X)
first(X1,X2) -> n__first(X1,X2)
first(0(),X) -> nil()
first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z)))
from(X) -> cons(X,n__from(s(X)))
from(X) -> n__from(X)
- Signature:
{activate/1,first/2,from/1} / {0/0,cons/2,n__first/2,n__from/1,nil/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {activate,first,from} and constructors {0,cons,n__first
,n__from,nil,s}
+ Applied Processor:
DependencyPairs {dpKind_ = WIDP}
+ Details:
We add the following weak innermost dependency pairs:
Strict DPs
activate#(X) -> c_1()
activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
activate#(n__from(X)) -> c_3(from#(X))
first#(X1,X2) -> c_4()
first#(0(),X) -> c_5()
first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
from#(X) -> c_7()
from#(X) -> c_8()
Weak DPs
and mark the set of starting terms.
* Step 2: UsableRules WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
activate#(X) -> c_1()
activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
activate#(n__from(X)) -> c_3(from#(X))
first#(X1,X2) -> c_4()
first#(0(),X) -> c_5()
first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
from#(X) -> c_7()
from#(X) -> c_8()
- Strict TRS:
activate(X) -> X
activate(n__first(X1,X2)) -> first(X1,X2)
activate(n__from(X)) -> from(X)
first(X1,X2) -> n__first(X1,X2)
first(0(),X) -> nil()
first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z)))
from(X) -> cons(X,n__from(s(X)))
from(X) -> n__from(X)
- Signature:
{activate/1,first/2,from/1,activate#/1,first#/2,from#/1} / {0/0,cons/2,n__first/2,n__from/1,nil/0,s/1,c_1/0
,c_2/1,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {activate#,first#,from#} and constructors {0,cons,n__first
,n__from,nil,s}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
activate#(X) -> c_1()
activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
activate#(n__from(X)) -> c_3(from#(X))
first#(X1,X2) -> c_4()
first#(0(),X) -> c_5()
first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
from#(X) -> c_7()
from#(X) -> c_8()
* Step 3: PredecessorEstimation WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
activate#(X) -> c_1()
activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
activate#(n__from(X)) -> c_3(from#(X))
first#(X1,X2) -> c_4()
first#(0(),X) -> c_5()
first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
from#(X) -> c_7()
from#(X) -> c_8()
- Signature:
{activate/1,first/2,from/1,activate#/1,first#/2,from#/1} / {0/0,cons/2,n__first/2,n__from/1,nil/0,s/1,c_1/0
,c_2/1,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {activate#,first#,from#} and constructors {0,cons,n__first
,n__from,nil,s}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{1,4,5,7,8}
by application of
Pre({1,4,5,7,8}) = {2,3,6}.
Here rules are labelled as follows:
1: activate#(X) -> c_1()
2: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
3: activate#(n__from(X)) -> c_3(from#(X))
4: first#(X1,X2) -> c_4()
5: first#(0(),X) -> c_5()
6: first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
7: from#(X) -> c_7()
8: from#(X) -> c_8()
* Step 4: PredecessorEstimation WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
activate#(n__from(X)) -> c_3(from#(X))
first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
- Weak DPs:
activate#(X) -> c_1()
first#(X1,X2) -> c_4()
first#(0(),X) -> c_5()
from#(X) -> c_7()
from#(X) -> c_8()
- Signature:
{activate/1,first/2,from/1,activate#/1,first#/2,from#/1} / {0/0,cons/2,n__first/2,n__from/1,nil/0,s/1,c_1/0
,c_2/1,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {activate#,first#,from#} and constructors {0,cons,n__first
,n__from,nil,s}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{2}
by application of
Pre({2}) = {3}.
Here rules are labelled as follows:
1: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
2: activate#(n__from(X)) -> c_3(from#(X))
3: first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
4: activate#(X) -> c_1()
5: first#(X1,X2) -> c_4()
6: first#(0(),X) -> c_5()
7: from#(X) -> c_7()
8: from#(X) -> c_8()
* Step 5: RemoveWeakSuffixes WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
- Weak DPs:
activate#(X) -> c_1()
activate#(n__from(X)) -> c_3(from#(X))
first#(X1,X2) -> c_4()
first#(0(),X) -> c_5()
from#(X) -> c_7()
from#(X) -> c_8()
- Signature:
{activate/1,first/2,from/1,activate#/1,first#/2,from#/1} / {0/0,cons/2,n__first/2,n__from/1,nil/0,s/1,c_1/0
,c_2/1,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {activate#,first#,from#} and constructors {0,cons,n__first
,n__from,nil,s}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
-->_1 first#(s(X),cons(Y,Z)) -> c_6(activate#(Z)):2
-->_1 first#(0(),X) -> c_5():6
-->_1 first#(X1,X2) -> c_4():5
2:S:first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
-->_1 activate#(n__from(X)) -> c_3(from#(X)):4
-->_1 activate#(X) -> c_1():3
-->_1 activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)):1
3:W:activate#(X) -> c_1()
4:W:activate#(n__from(X)) -> c_3(from#(X))
-->_1 from#(X) -> c_8():8
-->_1 from#(X) -> c_7():7
5:W:first#(X1,X2) -> c_4()
6:W:first#(0(),X) -> c_5()
7:W:from#(X) -> c_7()
8:W:from#(X) -> c_8()
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
5: first#(X1,X2) -> c_4()
6: first#(0(),X) -> c_5()
3: activate#(X) -> c_1()
4: activate#(n__from(X)) -> c_3(from#(X))
7: from#(X) -> c_7()
8: from#(X) -> c_8()
* Step 6: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
- Signature:
{activate/1,first/2,from/1,activate#/1,first#/2,from#/1} / {0/0,cons/2,n__first/2,n__from/1,nil/0,s/1,c_1/0
,c_2/1,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {activate#,first#,from#} and constructors {0,cons,n__first
,n__from,nil,s}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
2: first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
Consider the set of all dependency pairs
1: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
2: first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1))
SPACE(?,?)on application of the dependency pairs
{2}
These cover all (indirect) predecessors of dependency pairs
{1,2}
their number of applications is equally bounded.
The dependency pairs are shifted into the weak component.
** Step 6.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
- Signature:
{activate/1,first/2,from/1,activate#/1,first#/2,from#/1} / {0/0,cons/2,n__first/2,n__from/1,nil/0,s/1,c_1/0
,c_2/1,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {activate#,first#,from#} and constructors {0,cons,n__first
,n__from,nil,s}
+ Applied Processor:
NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(c_2) = {1},
uargs(c_6) = {1}
Following symbols are considered usable:
{activate#,first#,from#}
TcT has computed the following interpretation:
p(0) = [1]
p(activate) = [0]
p(cons) = [1] x2 + [2]
p(first) = [8]
p(from) = [1] x1 + [1]
p(n__first) = [1] x2 + [0]
p(n__from) = [0]
p(nil) = [0]
p(s) = [1] x1 + [1]
p(activate#) = [8] x1 + [0]
p(first#) = [8] x2 + [0]
p(from#) = [1] x1 + [2]
p(c_1) = [1]
p(c_2) = [1] x1 + [0]
p(c_3) = [2] x1 + [1]
p(c_4) = [0]
p(c_5) = [2]
p(c_6) = [1] x1 + [14]
p(c_7) = [1]
p(c_8) = [8]
Following rules are strictly oriented:
first#(s(X),cons(Y,Z)) = [8] Z + [16]
> [8] Z + [14]
= c_6(activate#(Z))
Following rules are (at-least) weakly oriented:
activate#(n__first(X1,X2)) = [8] X2 + [0]
>= [8] X2 + [0]
= c_2(first#(X1,X2))
** Step 6.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
- Weak DPs:
first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
- Signature:
{activate/1,first/2,from/1,activate#/1,first#/2,from#/1} / {0/0,cons/2,n__first/2,n__from/1,nil/0,s/1,c_1/0
,c_2/1,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {activate#,first#,from#} and constructors {0,cons,n__first
,n__from,nil,s}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
** Step 6.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
- Signature:
{activate/1,first/2,from/1,activate#/1,first#/2,from#/1} / {0/0,cons/2,n__first/2,n__from/1,nil/0,s/1,c_1/0
,c_2/1,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {activate#,first#,from#} and constructors {0,cons,n__first
,n__from,nil,s}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
-->_1 first#(s(X),cons(Y,Z)) -> c_6(activate#(Z)):2
2:W:first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
-->_1 activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2))
2: first#(s(X),cons(Y,Z)) -> c_6(activate#(Z))
** Step 6.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Signature:
{activate/1,first/2,from/1,activate#/1,first#/2,from#/1} / {0/0,cons/2,n__first/2,n__from/1,nil/0,s/1,c_1/0
,c_2/1,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {activate#,first#,from#} and constructors {0,cons,n__first
,n__from,nil,s}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
WORST_CASE(?,O(n^1))